package com.ruoyi.web.hbxx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.web.hbxx.domain.ChannelBuoyInfo;
import com.ruoyi.web.hbxx.mapper.ChannelBuoyInfoMapper;
import com.ruoyi.web.hbxx.service.IChannelBuoyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 南方测绘航标数据Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-19
 */
@Service
public class ChannelBuoyInfoServiceImpl implements IChannelBuoyInfoService
{
    @Autowired
    private ChannelBuoyInfoMapper channelBuoyInfoMapper;

    /**
     * 查询南方测绘航标数据
     *
     * @param id 南方测绘航标数据主键
     * @return 南方测绘航标数据
     */
    @Override
    public ChannelBuoyInfo selectChannelBuoyInfoById(Long id)
    {
        return channelBuoyInfoMapper.selectChannelBuoyInfoById(id);
    }

    /**
     * 查询南方测绘航标数据列表
     *
     * @param channelBuoyInfo 南方测绘航标数据
     * @return 南方测绘航标数据
     */
    @Override
    public List<ChannelBuoyInfo> selectChannelBuoyInfoList(ChannelBuoyInfo channelBuoyInfo)
    {
        return channelBuoyInfoMapper.selectChannelBuoyInfoList(channelBuoyInfo);
    }

    /**
     * 新增南方测绘航标数据
     *
     * @param channelBuoyInfo 南方测绘航标数据
     * @return 结果
     */
    @Override
    public int insertChannelBuoyInfo(ChannelBuoyInfo channelBuoyInfo)
    {
        channelBuoyInfo.setCreateTime(DateUtils.getNowDate());
        return channelBuoyInfoMapper.insertChannelBuoyInfo(channelBuoyInfo);
    }

    /**
     * 修改南方测绘航标数据
     *
     * @param channelBuoyInfo 南方测绘航标数据
     * @return 结果
     */
    @Override
    public int updateChannelBuoyInfo(ChannelBuoyInfo channelBuoyInfo)
    {
        channelBuoyInfo.setUpdateTime(DateUtils.getNowDate());
        return channelBuoyInfoMapper.updateChannelBuoyInfo(channelBuoyInfo);
    }

    /**
     * 批量删除南方测绘航标数据
     *
     * @param ids 需要删除的南方测绘航标数据主键
     * @return 结果
     */
    @Override
    public int deleteChannelBuoyInfoByIds(Long[] ids)
    {
        return channelBuoyInfoMapper.deleteChannelBuoyInfoByIds(ids);
    }

    /**
     * 删除南方测绘航标数据信息
     *
     * @param id 南方测绘航标数据主键
     * @return 结果
     */
    @Override
    public int deleteChannelBuoyInfoById(Long id)
    {
        return channelBuoyInfoMapper.deleteChannelBuoyInfoById(id);
    }
}
